import os
import cv2
from collections import OrderedDict

b = OrderedDict()
b.update({1:True})
b.update({2:False})
b.update({1:False})
print(b)

# base_dir = r'C:\Users\jiangzhengquan\Desktop\Switch_Dataset\result'
# writer = cv2.VideoWriter(os.path.join(base_dir, '1.mp4'), cv2.VideoWriter_fourcc(*"I420"), 20, (1923, 1027))
# files = os.listdir(base_dir)
# for i in range(4, 13):
#     fs = [f for f in files if f.startswith(str(i))]
#     fs = sorted(fs, key=lambda x: int(x.split('_')[-1].split('.')[0]))
#     for f in fs:
#         img = cv2.imread(os.path.join(base_dir, f))
#         writer.write(img)
